package com.onec.service.api.enums.error;

/**
 * @author onec
 */

public enum GatewayEnum {

    /**
     * 接口不存在
     */
    DECRYPT_ERROR(5001, "数据解密失败,请检查密钥是否正确！"),
    /**
     * 拒绝访问
     */
    SIGN_ERROR(5002, "签名验证错误！"),
    /**
     * 缺少token
     */
    SOURCE_ERROR(5003, "请求参数有误：source值！"),

    NO_SIGN(5004, "缺少头部sign值！"),

    /**
     * 服务器内部错误
     */
    SERVER_ERROR(500, "系统错误");

    private Integer code;

    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    GatewayEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
